//
//  WWGoodsDetailViewController.m
//  Shopping
//
//  Created by 张德华 on 8/23/16.
//  Copyright © 2016 张湾湾. All rights reserved.
//

#import "WWGoodsDetailViewController.h"

@interface WWGoodsDetailViewController ()

@property (nonatomic,strong) UIWebView *webView;

@property (nonatomic,strong) UIImageView *iv_imageView;

@property (nonatomic,strong) UIScrollView *scrollView;




@end

@implementation WWGoodsDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor grayColor];
    self.navigationItem.leftBarButtonItem = [UIBarButtonItem barButtonItemWithImageName:@"v2_goback" target:self action:@selector(backClick)];
    
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"分享" style:UIBarButtonItemStylePlain target:self action:@selector(sharedClick)];
    [self.navigationItem.rightBarButtonItem setTintColor:[UIColor darkGrayColor]];
    
    [self setupUI];
    
}

#pragma mark
#pragma mark - ***************NavigationBarItem事件监听
- (void)backClick {
    NSLog(@"%s",__func__);
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)sharedClick {
    NSLog(@"%s",__func__);
}


- (void)setupUI {
    
    [self.scrollView addSubview:self.iv_imageView];
    
    
    self.scrollView.contentSize = CGSizeMake(SCREENW, self.iv_imageView.frame.size.height);
    
    
    
    
    
    
    [self.view addSubview:self.scrollView];
    
}


#pragma mark
#pragma mark - ***************懒加载
- (UIImageView *)iv_imageView {
    if (!_iv_imageView) {
        _iv_imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREENW, 2000)];
        _iv_imageView.image = [UIImage imageNamed:@"aaaa"];
        
    
    }
    return _iv_imageView;
}

- (UIScrollView *)scrollView {
    if (!_scrollView) {
        _scrollView = [[UIScrollView alloc] initWithFrame:self.view.frame];
        _scrollView.backgroundColor = [UIColor blueColor];
        
    }
    return _scrollView;
}


//
//- (void)setupUI {
//    [self.view addSubview:self.webView];
//    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.taobao.com"]]];
//}

//- (UIWebView *)webView {
//    if (!_webView) {
//        _webView = [[UIWebView alloc] initWithFrame:self.view.frame];
//        _webView.backgroundColor = [UIColor whiteColor];
//    }
//    return _webView;
//}




@end
